import type {RouteRecordRaw} from 'vue-router';
import adminRoutes from './admin'
export default <RouteRecordRaw[]>[
    {
        name: "workbench",
        path: '',
        component: () => import('@/views/index/index.vue'),
        meta: {title: '工作台'}
    },
    {
        name: "todo",
        path: 'todo',
        component: () => import('@/views/todo/index.vue'),
        meta: {title: '待办事项'}
    },
    {
        name: "order",
        path: 'order',
        component: () => import('@/layouts/plain.vue'),
        meta: {title: '业务订单'},
        children: [
            {
                path: '',
                name: 'orderList',
                meta: {title: '订单列表'},
                component: () => import('@/views/order/index.vue')
            },
            {
                path: 'create', name: 'orderCreate',
                component: () => import('@/views/order/create.vue'), meta: {title: '急速开单'}
            }
        ]
    },
    {
        name: "project",
        path: 'project',
        component: () => import('@/views/project/index.vue'),
        meta: {title: '项目管理'}
    },
    {
        name: "finance",
        path: 'finance',
        component: () => import('@/views/finance/index.vue'),
        meta: {title: '账务管理'}
    },
    {
        name: "customer",
        path: 'customer',
        component: () => import('@/views/customer/index.vue'),
        meta: {title: '客户管理'}
    },
    {
        name: "products",
        path: 'products',
        component: () => import('@/views/product/index.vue'),
        meta: {title: '产品管理'}
    },
    {
        name: "admin",
        path: 'admin',
        component: () => import('@/views/admin/layout.vue'),
        meta: {title: '系统管理'},
        children:adminRoutes
    }
]